/**
 * Sonar iOS Client Application
 * Extension for Sonar, open source software quality management tool.
 * Copyright (C) 2011 Maris Plots
 * mailto: maris.plots@gmail.com
 *
 * Sonar iOS Client Application is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * Sonar iOS Client Application is distributed in the hope that it will be 
 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with Sonar iOS Client Application; if not, write to the Free 
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
 */

#import "NSString+SonarAdditions.h"

@implementation NSString(NSString_SonarAdditions)

+ (NSString *)sonar_stringWithData:(NSData *)data 
                          encoding:(NSStringEncoding)encoding{
    return [[[NSString alloc] initWithData:data encoding:encoding] autorelease];
}

- (NSString *)sonar_capitalizeFirstLetter{
    NSString *firstLetter = [[self substringToIndex:1]capitalizedString];
    NSRange range = NSMakeRange(0,1);
    return [self stringByReplacingCharactersInRange:range
                                         withString:firstLetter];
}

@end
